package cn.kgc.entity;

import java.math.BigDecimal;
import java.util.Date;
import java.io.Serializable;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.*;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonFormat;

import java.math.BigDecimal;

/**
 * (SmsSeckillSkuRelation)表实体类
 *
 * @author makejava
 * @since 2023-01-07 09:37:50
 */
@Setter
@Getter
@AllArgsConstructor
@NoArgsConstructor
@Builder
@TableName(value = "sms_seckill_sku_relation")
@SuppressWarnings("serial")
@JsonInclude(value = JsonInclude.Include.NON_NULL)
public class SmsSeckillSkuRelation extends Model<SmsSeckillSkuRelation> implements Serializable {

    @TableId(type = IdType.AUTO)
    private Long id; //主键


    /**
     * 活动场次id
     **/
    @TableField(value = "session_id")
    private Long sessionId;


    /**
     * 商品id
     **/
    @TableField(value = "sku_id")
    private Long skuId;


    /**
     * 秒杀价格
     **/
    @TableField(value = "seckill_price")
    private BigDecimal seckillPrice;


    /**
     * 秒杀总量
     **/
    @TableField(value = "seckill_count")
    private BigDecimal seckillCount;


    /**
     * 每人限购数量
     **/
    @TableField(value = "seckill_limit")
    private BigDecimal seckillLimit;


    /**
     * 排序
     **/
    @TableField(value = "seckill_sort")
    private Integer seckillSort;


    @TableField(value = "creationdate", fill = FieldFill.INSERT)
    @JsonIgnore
    private Date creationdate; //创建时间


    @TableField(value = "modifydate", fill = FieldFill.UPDATE)
    @JsonIgnore
    private Date modifydate; //修改时间


    @TableLogic
    @JsonIgnore
    @TableField(fill = FieldFill.INSERT)
    private int deleted;  //逻辑删除标志


    @Version
    private int version;   //版本


}
